package cn.edu.cqut.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import com.fasterxml.jackson.annotation.JsonFormat;

import java.time.LocalDate;
import com.baomidou.mybatisplus.annotation.TableId;
import java.time.LocalDateTime;

import org.springframework.format.annotation.DateTimeFormat;

import java.io.Serializable;

/**
 * <p>
 * 
 * </p>
 *
 * @author cqut-917371
 * @since 2020-06-24
 */
public class Serve extends Model<Serve> {

    private static final long serialVersionUID=1L;

    /**
     * 服务编号
     */
    @TableId(value = "se_no", type = IdType.AUTO)
    private Integer seNo;

    /**
     * 服务类型:0:咨询、1:投诉、2:建议
     */
    private Integer seType;
    
    @TableField(exist = false)
    private String seTypeCN;

	/**
     * 服务详细内容
     */
    private String seDetail;

    /**
     * 服务状态：0新创建，1已分配，2已处理，3已归档
     */
    private Integer seState;

    @TableField(exist = false) //这个属性在数据表里面没有映射字段
    private String seStateCN;
    
    /**
     * 创建人：客户经理
     */
    private String seCreator;

    /**
     * 创建时间
     */
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
    private LocalDateTime seCreatdate;

    /**
     * 分配时间
     */
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
    private LocalDateTime seAssigindate;

    /**
     * 处理方法
     */
    private String seMethod;

    /**
     * 处理时间
     */
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
    private LocalDateTime seProcessdate;

    /**
     * 处理人
     */
    private String seProcessor;

    /**
     * 处理结果
     */
    private String seResult;

    /**
     * 满意度：1-5，数字越大满意度越高
     */
    private Integer seStatisficing;
    @TableField(exist = false) //这个属性在数据表里面没有映射字段
    private String seStatisficingCN;

    public Integer getSeNo() {
        return seNo;
    }

    public void setSeNo(Integer seNo) {
        this.seNo = seNo;
    }

    public Integer getSeType() {
        return seType;
    }

    public void setSeType(Integer seType) {
        this.seType = seType;
    }

    public String getSeDetail() {
        return seDetail;
    }

    public void setSeDetail(String seDetail) {
        this.seDetail = seDetail;
    }

    public Integer getSeState() {
        return seState;
    }

    public void setSeState(Integer seState) {
        this.seState = seState;
    }

    public String getSeCreator() {
        return seCreator;
    }

    public void setSeCreator(String seCreator) {
        this.seCreator = seCreator;
    }

    public LocalDateTime getSeCreatdate() {
        return seCreatdate;
    }

    public void setSeCreatdate(LocalDateTime seCreatdate) {
        this.seCreatdate = seCreatdate;
    }

    public LocalDateTime getSeAssigindate() {
        return seAssigindate;
    }

    public void setSeAssigindate(LocalDateTime seAssigindate) {
        this.seAssigindate = seAssigindate;
    }

    public String getSeMethod() {
        return seMethod;
    }

    public void setSeMethod(String seMethod) {
        this.seMethod = seMethod;
    }

    public LocalDateTime getSeProcessdate() {
        return seProcessdate;
    }

    public void setSeProcessdate(LocalDateTime seProcessdate) {
        this.seProcessdate = seProcessdate;
    }

    public String getSeProcessor() {
        return seProcessor;
    }

    public void setSeProcessor(String seProcessor) {
        this.seProcessor = seProcessor;
    }

    public String getSeResult() {
        return seResult;
    }

    public void setSeResult(String seResult) {
        this.seResult = seResult;
    }

    public Integer getSeStatisficing() {
        return seStatisficing;
    }

    public void setSeStatisficing(Integer seStatisficing) {
        this.seStatisficing = seStatisficing;
    }
    public String getSeTypeCN() {
    	String ret = "";
		switch(seType) {
		case 0:
			ret = "咨询";
			break;
		case 1:
			ret = "投诉 ";
			break;
		case 2:
			ret = "建议 ";
			break;		
		}	
		return ret;		
	}
//    0新创建，1已分配，2已处理，3已归档
    public String getSeStateCN() {
    	String ret = "";
		switch(seState) {
		case 0:
			ret = "新创建";
			break;
		case 1:
			ret = "已分配 ";
			break;
		case 2:
			ret = "已处理";
			break;
		case 3:
			ret = "已归档 ";
			break;		
		}	
		return ret;	
	}


	@Override
    protected Serializable pkVal() {
        return this.seNo;
    }

    @Override
    public String toString() {
        return "Serve{" +
        "seNo=" + seNo +
        ", seType=" + seType +
        ", seDetail=" + seDetail +
        ", seState=" + seState +
        ", seCreator=" + seCreator +
        ", seCreatdate=" + seCreatdate +
        ", seAssigindate=" + seAssigindate +
        ", seMethod=" + seMethod +
        ", seProcessdate=" + seProcessdate +
        ", seProcessor=" + seProcessor +
        ", seResult=" + seResult +
        ", seStatisficing=" + seStatisficing +
        "}";
    }
}
